package com.rabbitmq.rabbitmq.receiver;

import com.rabbitmq.rabbitmq.config.MutiplyMessageConfig;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class MutiplyListener {

	@RabbitListener(queues = MutiplyMessageConfig.mutiplyQueue1)
	public void MutiplyListener1(Message message){
		System.out.println("队列1"+message);
	}


	@RabbitListener(queues = MutiplyMessageConfig.mutiplyQueue2)
	public void MutiplyListener2(Message message){
		System.out.println("队列2"+message);
	}

	@RabbitListener(queues = MutiplyMessageConfig.mutiplyFanoutQueue1)
	public void MutiplyFalountListener1(Message message){
		System.out.println("fanout1"+message);
	}

	@RabbitListener(queues = MutiplyMessageConfig.mutiplyFanoutQueue2)
	public void MutiplyFalountListener2(Message message){
		System.out.println("fanout2"+message);
	}

}
